package gui.event;

import java.util.EventObject;

//class for event occured when we are clicking on a menu item
public class SelectionEvent extends EventObject{

	private static final long serialVersionUID = 1L;
	private int menuIndex;

	//event constructor - it got's the source object and the object's index 
	public SelectionEvent(Object arg0, int menuIndex) {
		super(arg0);
		this.menuIndex = menuIndex;
	}
	
	//it returns with the index, what got this event
	public int getClickedIndex(){
		return menuIndex;
	}

}